import Link from 'next/link'

const posts = [{
    id: 1,
    title: 'Post 1',
    body: 'This is the first post.',
}, {
    id: 2,
    title: 'Post 2',
    body: 'This is the second post.',
}];
export default async function Page() {
    // const posts = await getPosts()

    return (
        <ul>
            {posts.map((post) => (
                // <Post key={post.id} post={post} />
                <li key={post.id}><Link href={`/blog/${post.id}`}>{post.title}</Link></li>
            ))}
        </ul>
    )
}